<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});


//资源控制器
// Route::get('/user','user\usercontroller@index');
Route::resource('/user','user\usercontroller');

Route::post('/hello',function() {
	return 'hello post';
});

Route::put('/hello',function() {
	return 'hello put';
});

Route::delete('/hello',function() {
	return 'hello delete';
});

Route::match(['post','get'],'/aaa',function() {
	return 'hello match';
});

Route::get('/bbb/{bbb?}',function($bbb = 'dddddddd') {
	return $bbb;
});

Route::get('/ccc/{ccc}',function($ccc) {
	return $ccc;
})->where('ccc','[0-9]+');

Route::get('/ddd','user\testcontroller@bbb');

Route::resource('/stu','stu\stucontroller');


Route::get('/demo','stu\stucontroller@demo');

Route::get('/test',function(){

	return view('\admin.index');

});

Route::resource('/ad','admin\adcontroller');

Route::get('/upfile','upfileController@index');

Route::post('/upfile','upfileController@upfiles');

Route::group(['prefix'=>'pre'],function(){

	Route::get('index','admin\adcontroller@create');

	Route::get('login','admin\adcontroller@login');

});


// 商品管理路由
Route::resource('/goods', 'admin\goodsController');

// 商品分类路由
Route::resource('/type','admin\typeController');

// 商品子分类显示添加路由
Route::get('/typeSon/{id}','admin\typeController@createSon');

// 商品子分类执行添加路由
Route::post('/typeSon','admin\typeController@storeSon');

// 公告管理路由
Route::resource('/offiche','admin\officheController');

// 快递管理路由
Route::resource('/dilivery','admin\diliveryController');

